package com.bubblecam.activity;

import com.bubblecam.thread.ViewThread;
import com.bubblecam.view.DisplayPanel;

import android.app.Activity;
import android.content.Context;
import android.content.pm.FeatureInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;

public class BubbleCamMain extends Activity {
	
	private PackageManager packagemanager;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Context context = this;
        packagemanager = context.getPackageManager();
        if(isCameraAvailable())
        {
        	Log.i("camera","Camera is available");
        }
        else
        {
        	Log.i("camera", "Camera not available");
        }
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        
        setContentView(new DisplayPanel(this));
    }
    public boolean isCameraAvailable()
    {
    	if(packagemanager.hasSystemFeature(PackageManager.FEATURE_CAMERA))
    	{
    		return true;
    	}
    	else
    	{
    		return false;
    		
    	}
    }
}